<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// ------------------------------------------------------------------------
//判断url中是否含有某段字符串(若为数组则以OR做判断)
/**
 * Url String Contains
 *
 * This function will find whether the url contains some Specific String 
 *
 * @param	string		string to find
 * @return	bolean		TRUE/FALSE
 */
if ( ! function_exists('url_contains'))
{
	function url_contains($str) {
		if (is_array($str)) {
			foreach ($str as $v) {
				if (strripos($_SERVER['REQUEST_URI'], $v)) {
					return TRUE;
				}
			}
		} else {
			if (strripos($_SERVER['REQUEST_URI'], $str)) {
				return TRUE;
			} else {
				return FALSE;
			}
		}
	}
}
